#!/bin/ash
#
# rc Script for busybox httpd.
# (c) dangbinghoo@gmail.com , playpenguin.org
#

. /etc/conf.d/httpd

start()
{	


echo " * Starting busybox httpd..."
httpd -p ${port} -u ${www_user} -h ${www_root} -c ${httpd_conf_file} &
}

restart()
{
	stop
	start
}

stop()
{
	pkill httpd
}

#
# main
#

case "$1" in
	"start")
		start;;
	"stop")	
		stop;;
	"restart")
		restart;;
	*)
		echo "Usage: $0 start|stop|restart"
		exit 0
esac

